/****************************************************************************
 * Elisa 1.0                                                                *
 *--------------------------------------------------------------------------*
 * Author: Laurent Granvilliers, Vincent Sorin                              *
 * Copyright (c) 2004 Laboratoire d'Informatique de Nantes Atlantique       *
 *--------------------------------------------------------------------------*
 * Elisa is distributed WITHOUT ANY WARRANTY. Read the associated           *
 * COPYRIGHT file for more details.                                         *
 *--------------------------------------------------------------------------*
 * elisa_expression.cpp                                                     *
 ****************************************************************************/

#include "elisa_expression.h"

USING_ELISA

//--------------------------------------------------------------------------
// class SymbolicExpressionRep
//--------------------------------------------------------------------------

int SymbolicExpressionRep::addRef()
{
	return ++_nref;
}

int SymbolicExpressionRep::delRef()
{
	if (--_nref == 0) {
		delete this;
	}
	return _nref;
}

int SymbolicExpressionRep::ref() const
{
	return _nref;
}

std::ostream &
operator<<(std::ostream & os,
           const elisa::SymbolicExpression & e)
{
	e.print(os);
	return os;
}
